package com.lyf.core.pojo;

import java.util.LinkedList;
import java.util.List;

public class Menu implements java.io.Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 2065397097800968930L;
	
	private String menu_id ;// serial primary key,
	private String parent_id	;//int	default 0, -- 上一级菜单的ID 如果为根 这里为0或者null
	private String menu_name	;//varchar(50) ,
	private String menu_url	;//varchar(200),
	private String menu_icon	;//varchar(200) ,
	
	private Integer menu_type = 1;//is '菜单类型, 1- 可显示菜单,2-权限URL' ;
	private boolean is_visible = true; //is '是否显示,menu_type=2的URL 都是不可显示的' ;

	
	//private String menu_class ;//character varying(50) NOT NULL, -- 菜单对应的应用
	
	private List<Menu> children ; //冗余字段
	private String state ; // open close 
	
	public void addChild(Menu m) {
		if(children == null){
			children = new LinkedList<>();
		}
		children.add(m);
	}
	
	 
	public List<Menu> getChildren() {
		return children;
	}
	public void setChildren(List<Menu> children) {
		this.children = children;
	}
	public String getMenu_id() {
		return menu_id;
	}
	public void setMenu_id(String menu_id) {
		this.menu_id = menu_id;
	}
	public String getParent_id() {
		return parent_id;
	}
	public void setParent_id(String parent_id) {
		this.parent_id = parent_id;
	}
	public Integer getMenu_type() {
		return menu_type;
	}
	public void setMenu_type(Integer menu_type) {
		this.menu_type = menu_type;
	}
	public boolean isIs_visible() {
		return is_visible;
	}
	public void setIs_visible(boolean is_visible) {
		this.is_visible = is_visible;
	}
	public String getMenu_name() {
		return menu_name;
	}
	public void setMenu_name(String menu_name) {
		this.menu_name = menu_name;
	}
	public String getMenu_url() {
		return menu_url;
	}
	public void setMenu_url(String menu_url) {
		this.menu_url = menu_url;
	}
	public String getMenu_icon() {
		return menu_icon;
	}
	public void setMenu_icon(String menu_icon) {
		this.menu_icon = menu_icon;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	
	
	 
}
